Flags governing label insertion. The value has the form
(derive prompt)If deriveis
t, RefTeX will try to derive a sensible label from context. A section label for example will be derived from the section heading. The conversion of the context to a valid label is governed by the specifications given inreftex-derive-label-parameters. If derive isnil, the default label will consist of the prefix and a unique number, like ‘eq:23’.If prompt is
t, the user will be prompted for a label string. When prompt isnil, the default label will be inserted without query.So the combination of derive and prompt controls label insertion. Here is a table describing all four possibilities:
derive prompt action ----------------------------------------------------------- nil nil Insert simple label, like ‘eq:22’ or ‘sec:13’. No query. nil t Prompt for label. t nil Derive a label from context and insert. No query. t t Derive a label from context, prompt for confirmation.Each flag may be set to
t,nil, or a string of label type letters indicating the label types for which it should be true. Thus, the combination may be set differently for each label type. The default settings ‘"s"’ and ‘"sft"’ mean: Derive section labels from headings (with confirmation). Prompt for figure and table labels. Use simple labels without confirmation for everything else.The available label types are:
s(section),f(figure),t(table),i(item),e(equation),n(footnote),N(endnote) plus any definitions inreftex-label-alist.
If non-
nil, should be a function which produces the string to insert as a label definition. The function will be called with two arguments, the label and the default-format (usually ‘\label{%s}’). It should return the string to insert into the buffer.
Function to turn an arbitrary string into a valid label. RefTeX's default function uses the variable
reftex-derive-label-parameters.
Filter function which will process a context string before it is used to derive a label from it. The intended application is to convert ISO or Mule characters into something valid in labels. The default function
reftex-latin1-to-asciiremoves the accents from Latin-1 characters. X-Symbol (>=2.6) sets this variable to the much more generalx-symbol-translate-to-ascii.
Parameters for converting a string into a label. This variable is a list of the following items:
- nwords
- Number of words to use.
- maxchar
- Maximum number of characters in a label string.
- invalid
nil: Throw away any words containing characters invalid in labels.
t: Throw away only the invalid characters, not the whole word.- abbrev
nil: Never abbreviate words.
t: Always abbreviate words (seereftex-abbrev-parameters).
1: Abbreviate words if necessary to shorten label string.- separator
- String separating different words in the label.
- ignorewords
- List of words which should not be part of labels.
- downcase
t: Downcase words before putting them into the label.
Parameters for abbreviation of words. A list of four parameters.
- min-chars
- Minimum number of characters remaining after abbreviation.
- min-kill
- Minimum number of characters to remove when abbreviating words.
- before
- Character class before abbrev point in word.
- after
- Character class after abbrev point in word.